<?php

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;

/**
 * 用户黑名单拉取同步
 * @package App\Jobs
 */
class WxUserBlackDownload implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
    //微信应用ID
    protected $appid;
    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct($appid)
    {
        $this->appid = $appid;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        (new \App\Services\WxUser\WxUserService($this->appid))->syncBlack();
    }
}
